#include "StdAfx.h"
#include "robotron.h"
#include "defender.h"
#include "machine/williamsmachine.h"

static InputPort Port1 =
	{
		{
		{"Up",			I_UP,			0x01,	I_HIGH},
		{"Down",			I_DOWN,		0x02,	I_HIGH},
		{"Left",			I_LEFT,		0x04,	I_HIGH},
		{"Right",		I_RIGHT,		0x08,	I_HIGH},
		{"Start 1",		I_START1,	0x10,	I_HIGH},
		{"Start 2",		I_START2,	0x20,	I_HIGH},
		{"Fire Up",		I2_UP,		0x40,	I_HIGH},
		{"Fire Down",	I2_DOWN,		0x80,	I_HIGH},
		}
	};

static InputPort Port2 =
	{
		{
		{"Fire Left",	I2_LEFT,		0x01,	I_HIGH},
		{"Fire Right",	I2_RIGHT,	0x02,	I_HIGH},
		{"Unknown",		0,				0x04,	I_HIGH},
		{"Unknown",		0,				0x08,	I_HIGH},
		{"Unknown",		0,				0x10,	I_HIGH},
		{"Unknown",		0,				0x20,	I_HIGH},
		{"Unknown",		0,				0x40,	I_HIGH},
		{"Unknown",		0,				0x80,	I_HIGH},
		}
	};

static highscore_t highscore[] =
	{
//	{0xB260,0x60,0x00,0x48},
	{0,-1}
	};

Crobotron::Crobotron()
{
SetName("robotron");						//set romset name
SetScreen(304,256);
SetHighScoreInfo(highscore);
SetPort(0,&Port1);
SetPort(1,&Port2);
SetPort(2,&defenderPort3);
AddROM("robotron.sba",	0xD000,0x1000,0x13797024,ROM_CPU1);
AddROM("robotron.sbb",	0xE000,0x1000,0x7e3c1b87,ROM_CPU1);
AddROM("robotron.sbc",	0xF000,0x1000,0x645d543e,ROM_CPU1);
AddROM("robotron.sb1",	0x10000,0x1000,0x66c7d3ef,ROM_CPU1);
AddROM("robotron.sb2",	0x11000,0x1000,0x5bc6c614,ROM_CPU1);
AddROM("robotron.sb3",	0x12000,0x1000,0xe99a82be,ROM_CPU1);
AddROM("robotron.sb4",	0x13000,0x1000,0xafb1c561,ROM_CPU1);
AddROM("robotron.sb5",	0x14000,0x1000,0x62691e77,ROM_CPU1);
AddROM("robotron.sb6",	0x15000,0x1000,0xbd2c853d,ROM_CPU1);
AddROM("robotron.sb7",	0x16000,0x1000,0x49ac400c,ROM_CPU1);
AddROM("robotron.sb8",	0x17000,0x1000,0x3a96e88c,ROM_CPU1);
AddROM("robotron.sb9",	0x18000,0x1000,0xb124367b,ROM_CPU1);
AddROM("robotron.snd",	0xF000,0x1000,0xc56c1d28,ROM_CPU2);
AddROM("decoder.4",		0x0000,0x0200,0xe6631c23,ROM_PROM);
AddROM("decoder.6",		0x0200,0x0200,0x83faf25e,ROM_PROM);
}

CMachine *Crobotron::CreateMachine()
{
return(new CWilliamsMachine());
}
